//
//  MottoModel.m
//  TQY
//
//  Created by 甘世清 on 2024/8/27.
//

#import "MottoModel.h"

@implementation MottoModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
   return @{@"userid": @"id"};
}

-(CGSize)cellSize{

    UITextView * text = [[UITextView alloc]init];
    text.text = self.content;
    text.font = FONT_WENYUE(18);
    CGSize size = CGSizeMake(SCREEN_WIDETH-50, [text sizeThatFits:CGSizeMake(SCREEN_WIDETH-50, MAXFLOAT)].height + 6);
    if (size.height * 2 > SCREEN_HEIGHT-TopHeight-200-FootHeight) {
        return CGSizeMake(SCREEN_WIDETH-50, SCREEN_HEIGHT-TopHeight-190-FootHeight);
    } else {
        return size;
    }
}
- (float)height{
    UITextView * text = [[UITextView alloc]init];
    text.text = self.content;
    text.font = FONT_WENYUE(18);
    CGSize size = CGSizeMake(SCREEN_WIDETH-44, [text sizeThatFits:CGSizeMake(SCREEN_WIDETH-44, MAXFLOAT)].height + 6);
    return size.height;
}
@end
